package com.example.hjt_java_web_homework2.application.dto;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author Li Chun Hei
 * @date 31/10/2025
 * @description
 */
public class EnvironmentDataDTO {
    private Long id;

    @NotNull(message = "温度不能为空")
    private BigDecimal temperature;

    @NotNull(message = "湿度不能为空")
    private BigDecimal humidity;

    @NotNull(message = "能耗不能为空")
    private BigDecimal energyConsumption;

    private String location;
    private LocalDateTime recordedAt;

    // Getters and Setters
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    public BigDecimal getTemperature() { return temperature; }
    public void setTemperature(BigDecimal temperature) { this.temperature = temperature; }
    public BigDecimal getHumidity() { return humidity; }
    public void setHumidity(BigDecimal humidity) { this.humidity = humidity; }
    public BigDecimal getEnergyConsumption() { return energyConsumption; }
    public void setEnergyConsumption(BigDecimal energyConsumption) { this.energyConsumption = energyConsumption; }
    public String getLocation() { return location; }
    public void setLocation(String location) { this.location = location; }
    public LocalDateTime getRecordedAt() { return recordedAt; }
    public void setRecordedAt(LocalDateTime recordedAt) { this.recordedAt = recordedAt; }
}
